<!DOCTYPE html>
<html>
<head>
  {include file="top.tpl"}
  <link rel="stylesheet" href="{$css.url}base_setting_min.css">
</head>
<body class="skin-blue">
<div class="wrapper">
  {include file="bread_crumbs.tpl"}
  <!--引入面包屑-->
  <section class="base-setting-wrap">
    <div class="row">
      <div class="col-md-12">
        <div class="box">
          <div class="box-header with-border clearfix">
              <div class="box-form pull-right form-group-sm">
                 <form method="get" action="" class="simple_search">
                     <input type="hidden" name="act" value="simple_search">
                         <p class="pull-right">
                            <a href="javascript:;" class="btn btn-success btn-sm" id="js_toggleSearchBox">
                               <i class="fa fa-search mr5">                                
                               </i>
                               搜索选项
                            </a>
                         </p>
                     </input>
                 </form>
              </div>
              <div class="clearfix"></div>
              <div class="search-box" id="js_searchBox">
                  <div class="nav-tabs-custom no-margin">
                      <div class="tab-content">
                         <div class="tab-pane active" id="tab_1">
                            <form method="get" action="/base/warehouse/index" class="form-inline" >
                                <div class="form-group-sm">
                                    <div class="mb10">
                                       <p>
                                          <div class="form-group">
                                              &nbsp;&nbsp;&nbsp;&nbsp;
                                              <label class="control-label">仓库类型：</label>
                                              <div class="inline">
                                                  <select class="form-control" name="type"  >
                                                       <option value="">请选择</option>
                                                       <option value="1" {if isset($params.type) && $params.type == 1}selected="selected"{/if}>自主</option>
                                                       <option value="2" {if isset($params.type) && $params.type == 2}selected="selected"{/if}>合约</option>  
                                                       <option value="3" {if isset($params.type) && $params.type == 3}selected="selected"{/if}>公共</option>                                                                                         
                                                  </select>
                                              </div>
                                              &nbsp;&nbsp;&nbsp;&nbsp;
                                              <label class="control-label">所属事业部：</label>
                                              <div class="inline">
                                                  <select class="form-control" name="dept_id">
                                                       <option value="">请选择</option>
                                                       {foreach $depts as $k => $v}
                                                       <option value="{$k}" {if isset($params.dept_id) && $params.dept_id == $k}selected="selected"{/if}>{$v}</option>
                                                       {/foreach}
                                                  </select>
                                              </div>
                                              &nbsp;&nbsp;&nbsp;&nbsp;
                                              <label class="control-label">是否海外仓：</label>
                                              <div class="inline">
                                                  <select class="form-control" name="is_oversea">
                                                       <option value="404" {if isset($params.is_oversea) && $params.is_oversea == 0}selected="selected"{/if}>请选择</option>
                                                       <option value="0" {if isset($params.is_oversea) && $params.is_oversea == 0}selected="selected"{/if}>否</option>
                                                       <option value="1" {if isset($params.is_oversea) && $params.is_oversea == 1}selected="selected"{/if}>是</option> 
                                                  </select>
                                              </div>
                                              &nbsp;&nbsp;&nbsp;&nbsp;
                                              <label class="control-label">搜索关键词： </label>
                                              <select class="form-control" name="search_type">
                      												  <option value="warehouse_code" {if isset($params.search_type) && $params.search_type == "warehouse_code"}selected="selected"{/if}>仓库代码</option>
                      												  <option value="warehouse_name" {if isset($params.search_type) && $params.search_type == "warehouse_name"}selected="selected"{/if}>仓库名称</option>		                						  
                    											    </select>
											                        <input type="text" class="form-control" name="keyword"  placeholder="输入搜索关键词" size="23" value="{if isset($params.keyword)}{$params.keyword}{/if}">
                                          </div>
                                          &nbsp;&nbsp;&nbsp;&nbsp;
	                                      <button type="submit" class="btn btn-primary btn-sm">立即搜索</button>   
	                                      &nbsp;&nbsp;&nbsp;&nbsp;
	                                      <input type="button" id="clear_btn" class="btn btn-primary btn-sm" value="清空"/>  
                                       </p>
                                    </div>
                                </div>
                            </form>
                         </div>
                      </div>
                  </div> 
              </div>
          </div>
          <!-- /.box-header search options -->
          <div class="box-body">
            <table class="table table-bordered table-striped table-hover">
              <thead>
                <tr>
                  <th>仓库代码</th>
                  <th>仓库名称</th>
                  <th>仓库类型</th>
                  <th>是否海外仓</th>
                </tr>
              </thead>
              <tbody>
              {if isset($data) && !empty($data)}
              {foreach $data as $v}
                <tr>
                  <td>{$v.warehouse_code}</td>
                  <td>{$v.warehouse_name}</td>
                  <td>{if $v.type==1}自主{elseif $v.type==2}合约{else}公共{/if}</td>
                  <td>{if $v.is_oversea==1}是{else}否{/if}</td>
                </tr>
              {/foreach}
              {/if}
              </tbody>
            </table>
          </div>
          <!-- .box-body -->
          <div class="box-footer text-center clearfix">{$page_link}</div>
        </div>
      </div>
    </div>
  </section>
</div>
{include file='foot.tpl'}
<script>
{literal}
$("#clear_btn").click("click",function(){window.location.href="/base/warehouse/index";});
{/literal}
</script>
</body>
</html>